/**
 * 
 */
package br.srv.full.virtual.entities.faces;

import java.util.List;

import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

/**
 * @author Delfino
 * 
 */
@Entity
@DiscriminatorValue(value = "B")
public class FacesManagedBean extends FacesMember {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1189819381717142017L;
	
	@OneToMany(targetEntity = FacesActionMethod.class, fetch = FetchType.EAGER, mappedBy = "facesManagedBean")
	private List<FacesActionMethod> facesActionMethods;

	public FacesManagedBean() {

	}

	public FacesManagedBean(String p_name) {
		super(p_name);
	}

	/**
	 * @return the facesActionMethods
	 */
	public List<FacesActionMethod> getFacesActionMethods() {
		return facesActionMethods;
	}

	/**
	 * @param p_facesActionMethods
	 *            the facesActionMethods to set
	 */
	public void setFacesActionMethods(List<FacesActionMethod> p_facesActionMethods) {
		facesActionMethods = p_facesActionMethods;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return getName();
	}
}
